<?php
namespace Home\Controller;
use Think\Controller;
class BaseController extends Controller {
	
	public function _initialize(){
		//栏目
		$type = M('type');
		$typeRes = $type->select();
		$this->type = $typeRes;
		//最新文章
		$article = M('article');
		$where['new']=1;
		$newArticleRes = $article->where($where)->select();
		$this->newArticle = $newArticleRes;
	}
}